<?php

namespace app\model;

use core\lib\model;

class testModel extends model
{

    public $table = 'test';
    public function lists()
    {
        $ret = $this->select($this->table,'*');
        return $ret;
    }
    
    public function addOne($data)
    {
        return $this->insert($this->table,$data);
    }

    public function getOne($id)
    {
        $ret = $this->get($this->table,'*',[
            'id' =>$id,
        ]);
        return $ret;
    }

    public function setOne($id,$data)
    {
        return $this->update($this->table,$data,[
            'id' => $id,
        ]);
    }

    public function delOne($id)
    {
        return $this->delete($this->table,[
            'id' => $id,
        ]);
    }

}